package com.examinantsdk.bean

import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
import java.io.Serializable

@Keep
class Word : Serializable {
    constructor()
    constructor(
        word: String,
        analysisList: List<String>?
    ) {
        this.words = word
        this.analysisList = analysisList
    }

    constructor(
        word: String,
        analysisList: List<String>?,
        dictionary_id: Long,
        know_status: Int,
        id: Long
    ) {
        this.words = word
        this.analysisList = analysisList
        this.dictionary_id = dictionary_id
        this.know_status = know_status
        this.id = id
    }

    constructor(
        isEmptyView: Boolean,
    ) {
        this.isEmptyView = isEmptyView
    }

//    @PrimaryKey(autoGenerate = true)
    //单词id
    var id: Long = 0

    //单词
//    @field:SerializedName("words")
    var words: String = ""
    var word: String = ""

    //英式音标
    var phonetic_en: String = ""

    //美式音标
    var phonetic_am: String = ""

    //单词释义
    var analysis: String = ""

    @field:SerializedName("analysis_list")
    var analysisList: List<String>? = null

    //单词出现总次数
    @field:SerializedName("words_count")
    var wordcount: Int = 0

    //阅读中出现次数
    @field:SerializedName("reading_count")
    var readcount: Int = 0

    //听力中出现次数
    @field:SerializedName("listening_count")
    var listencount: Int = 0

    //写作中出现次数
    @field:SerializedName("writing_count")
    var writecount: Int = 0

    //翻译中出现次数
    @field:SerializedName("translation_count")
    var transcount: Int = 0

    //列句
    @field:SerializedName("example_list")
    var exampleList: List<WordExample>? = null
    var status: Int = 0

    //列表item是否展开
    var expand: Boolean = false

    //是否已收藏 0未收藏，1已收藏
    var collection: Int = 0
    var collection_at: String = ""
    var showTime: Boolean = false
    var type_id: Int = 0
    var right_status: Int = 0 //0不认识 1认识 2模糊 3未学习
    var know_status: Int = 3 //0不认识 1认识 2模糊 3未学习
    var isShowBack: Boolean = false
    var isPlaying: Boolean = false
    var isSelect: Boolean = false //本地是否选中
    var wordIndex: Int = 0
    var second_category_id: Int = 0 // 2高频词 3中频词 4低频词 5简单词 6偶考词
    var audio_url: String = ""  // 单词的音频地址
    var en_audio_url: String? = ""  // 英式音频地址
    var analysis_audio_url: String = ""  // 单词释义的音频地址
    var detailLoaded: Boolean = false

    //    @field:SerializedName("mnemonic")
    @field:SerializedName("mnemonic_list")
    var memoryBean: MutableList<MemoryTypeBean>? = null
    var selected: Int = 0 //是否已选， 1：已选择
    var reviewed: Int = 0 // 是否已复习 0否 1是
    var reviewStatus: Int = 0 // 复习是否记住 2否 1是
    var options: MutableList<Options> = ArrayList()
    var isAnswered: Boolean = false
    var selectPos: Int = -1
    var cardPos: Int = 0
    var cardCount: Int = 0
    var dictionary_id: Long = 0  // 词典id
    var collect_id: String = "0"  // 单词本内部数据列表的id 新增
    var is_exam_word: Int = 0  // 是否为考纲词，0否 1是
    var isEmptyView: Boolean = false
}

data class Options(
    val option: String, // 选项
    val word: String, // 选项
    val analysis: String, // 选项
    val is_right: Int // 是否为正确答案 0否 1是
)
